package com.vietnam.power.dao;

import java.util.List;

import com.vietnam.power.domain.ArticleSearchCriteria;
import com.vietnam.power.persitence.Article;
import com.vietnam.power.persitence.ArticleGroup;

/**
 * @author DinhCuong
 * 
 */
public interface ArticleDao {
	public Article getArticleById(int id);

	public List<Article> getArticleListByCriteria(ArticleSearchCriteria psc, int page, int max);

	public int totalArticles(ArticleSearchCriteria psc);

	// article group
	public void createArticleGroup(ArticleGroup ag);

	public void updateArticleGroup(ArticleGroup ag);

	public ArticleGroup getArticleGroup(int id);

	public void deleteArticleGroup(ArticleGroup ag);

	public List<ArticleGroup> getArticleGroupList();
	// article
	public void createArticle(Article a);

	public void updateArticle(Article a);

	public void deleteArticle(Article a);
	
	public List<Article> searchArticle(ArticleSearchCriteria psc);
	
	public long countArticleNumberInGroup(int groupId);
}
